{% extends "base.html" %}
{% block content %}
<article>
  <section class="section-color container">
    <p class="breadcrumb"><a href="index.html">&#12298; Back to main documentation page</a></p>
    <header>
      <h2 class="header-story">Making a timeline from a Google Spreadsheet</h2>
      <p>
        You can create a simple timeline in a few short minutes using our <a href="https://drive.google.com/previewtemplate?id=1pHBvXN7nmGkiG8uQSUB82eNlnL8xHu6kydzH_-eguHQ&mode=public">Google spreadsheet template</a>, and this quick guide explaining the basic process.  <a href="json-format.html">Experts can use their JSON</a> skills to create custom installations, while keeping TimelineJS3's core look and functionality.
      </p>
      <p>
        For an example of a completed spreadsheet, see  <a href="https://docs.google.com/spreadsheets/u/1/d/1xuY4upIooEeszZ_lCmeNx24eSFWe0rHe9ZdqH2xqVNk/pubhtml" target="_blank">the spreadsheet</a> which powers the example on our <a href="/index.html">home page</a>.
      </p>
    </header>
  </section>
  <section class="product-page container">
    <div>
      <h4 id="dates">Working with dates</h4>
      <p id="start_date">
        The first four spreadsheet columns (<strong>A-D</strong>) are the date of your timeline entry. You can just enter the year, or you can get down to details such as month, day and even time of an event. You <em>must</em> enter at least the year, except for a 'title' slide. (To enter BCE dates, use a negative year, such as <em>-500</em>)
      </p>
      <p id="end_date">
        You have the option to add end dates (columns <strong>E-H</strong>). Again, you can just enter the year, or you can get as detailed as you like. End dates will cause TimelineJS to display spans of time (a.k.a. eras) in the bottom portion of the timeline. If your event doesn't have an "end date", leave these blank&mdash;you don't need to repeat the start date.
      </p>
      <p id="display_date">
        If you need more flexibility about how dates are shown in a slide, you can use column <strong>I</strong> to specify a "display date," which will override any decisions TimelineJS makes about how to show the date. This can be helpful if the actual date is not known, but you need to specify the date so that TimelineJS know how to display it relative to other events. The display date is used on the slide where it is specified, and on labels for the "next" and "previous" buttons which lead to that slide.
      </p>
      <h4>Adding content</h4>
      <p id="slide_text">
        Columns <strong>J</strong> and <strong>K</strong> of the spreadsheet contain the headline and the body text that will be displayed on each slide of your timeline.
      </p>
      <h4 id="media">Adding media (optional)</h4>
      <p>
        TimelineJS can pull in media from a variety of sources and has built-in support for Twitter, Instagram, Flickr, Google Maps, DropBox, DocumentCloud, Wikipedia, SoundCloud, Storify, iframes, major video sites (YouTube, Vimeo, etc.) and more. <a href="media-types.html">Read more about the media types TimelineJS works with.</a>
      </p>
      <p>
        You have the option to add media to your slides in columns <strong>L-O</strong>. Under the <strong>Media</strong> column (<strong>L</strong>) enter the link (URL) to the media you wish to display. TimelineJS supports multiple <a href="media-types.html">media types</a>. In the next column (<strong>M</strong>), you can credit the media's original source, and in column <strong>N</strong> you can include a short caption.
      </p>
      <p id="media_markup">
        If TimelineJS doesn't support the media type you want on your slide, you can often make do by entering <code>&lt;iframe&gt;</code> markup in the <strong>Media</strong> column (<strong>L</strong>) instead of a URL. You can also enter <code>&lt;blockquote&gt;</code> markup in column L.
      </p>
      <p id="thumbnail">
        Markers for slides that contain media show a small icon representing the type of media used. If you'd like, you can show a thumbnail of the media there, instead. Simply add the URL of the image you'd like to use to column <strong>O</strong>.
      </p>
      <p id="slide_background">
        If you like, you can set the background of the slide to a specific color or an image. To do this, enter a <a href="https://www.w3schools.com/cssref/css_colors.asp">CSS hex color</a> value, <a href="http://www.w3schools.com/cssref/css_colors.asp">CSS named color</a>, or the URL to an image in the <strong>Background</strong> column (<strong>R</strong>).
      </p>
      <h4 id="title_slides">Titles and Eras</h4>
      <p>
        The <strong>Type</strong> column (<strong>P</strong>) can be used to activate a few more specialized features in Timeline. In most cases, you'll leave it blank.
      </p>
      <p>
        If you use the word <code>title</code> in this column, then Timeline will use the row as a "title slide," which is shown before all others, and which does not require a date. Title
        slides do not appear in the markers in the navigation component of the Timeline. You should only have one row with "title" in the Type column.
      </p>
      <p>
        If you use the word <code>era</code> in this column, then Timeline will use the row to label a span of time in the "axis" area of the timeline navigation component. Each era gets
        a distinct color, which is not currently configurable. At this time, overlapping eras are not well-supported, but we are investigating design strategies for that use case.
      </p>
      <h4 id="organizing_slides">Organizing slides</h4>
      <p>
        TimelineJS automatically orders slides according to their start date, and always puts the title slide first, no matter how the rows in your spreadsheet are ordered. If you need to have two slides with exactly the same start date, then the row which appears first in the spreadsheet will be shown first in the timeline.
      </p>
      <p id="groups">
        Using the <strong>Group</strong> column (<strong>Q</strong>), you can organize your slides by groups (formerly known as "tags"). You can put any values you want in the Group column. Events with the same group will be put in the same row or adjacent rows, and TimelineJS will use the text from the Group column as a label at the left edge of the row(s) containing those events. The group text will also be displayed on each slide. If you like, you can have a mix of slides in groups and slides with a blank value in the Group column.
      </p>
    </div>
  </section>
  <section class="section-color section-color-complement">
    <div class="container">
      <h4 id="publishing">Publishing your Timeline</h4>
      <p>Now that you have your spreadsheet set up, you can turn it into a timeline in a couple easy steps.</p>
      <ol class="instructional-steps">
        <li class="step grid">
          <div class="step-number column-2">
            <h6>Publish to Web</h6>
          </div>
          <div class="step-details column-10 grid">
            <div class="column-6">
              <p>
                Go to the File menu of your Google spreadsheet and select "Publish to the Web." In the window that pops up make sure you are under Link (it should place you there by default), then make sure that "Automatically republish when changes are made" is checked and that "Entire Document" is selected.
              </p>
              <p class="note">
                If you are using <em>Google Apps for Work</em> or <em>Google Apps for Education</em>, this may not work without the cooperation of your local Google Apps administrator, even if you follow the steps exactly.
              </p>
            </div>
            <div class="column-6" id="step-screenshots">
              <img class="polaroid doc-illos" src="{{ static_url }}/img/make/publish_to_web_small.png" alt="Publish to Web">
              <img class="polaroid doc-illos" src="{{ static_url }}/img/make/publish_to_web_button_small.png" alt="Publish to Web 2">
              <img class="polaroid doc-illos last" src="{{ static_url }}/img/make/publish_to_web_url_small.png" alt="Publish to Web 3">
            </div>
          </div>
        </li>
        <li class="step grid">
          <div class="step-number column-2">
            <h6>Copy the link.</h6>
          </div>
          <div class="step-details column-10">
            Copy the link.
          </div>
        </li>
        <li class="step grid">
          <div class="step-number column-2">
            <h6>Open TimelineJS</h6>
          </div>
          <div class="step-details column-10">
            <p><a href="/index.html#make-step-3">Open the TimelineJS site</a>. Paste your copied link into the "Google spreadsheet URL" box. There you are also given some styling options to play around with if you desire.</p>
          </div>
        <li class="step grid">
          <div class="step-number column-2">
            <h6>Grab the embed code</h6>
          </div>
          <div class="step-details column-10">
            <p>Copy the embed code displayed and paste it on your site wherever you'd like it to appear.</p>
          </div>
        </li>
      </ol>
      <p>Congratulations! You should be well on your way to creating a simple timeline and playing within the Google spreadsheet boundaries. If you have any specific questions, <a href="mailto:support@knightlab.zendesk.com">please email us</a>.</p>
    </div>
  </section>
</article>

{% endblock %}

{% block scripts %}
<script type="text/javascript">
jQuery(document).ready(function() {
  // make permalinks function for each question
  jQuery("p[id],h4[id]").each(function(){
    jQuery(this).css('cursor','pointer');
    jQuery(this).click(function(){
      window.location.hash = "#" + this.id;
    })
  });
});
</script>
{% endblock %}
